@mixin snapcraft-p-multiselect {
  $box-shadow-color: rgba(0, 0, 0, .12);

  .p-multiselect__wrapper {
    margin-top: .5rem;
  }

  .p-multiselect__clear {
    float: right;
    margin-top: -2rem;
  }

  .p-multiselect {
    @extend %vf-clearfix;
    align-content: flex-start;
    align-items: flex-start;
    border: 1px solid $color-mid-light;
    border-radius: .125rem;
    box-shadow: inset 0 1px 1px $box-shadow-color;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    line-height: 1.5rem;
    margin-top: $spv-outer--small;
    min-width: 10em;
    padding: 0 .5rem;
    position: relative;
    width: 100%;

    &.is-disabled {
      cursor: not-allowed;
      opacity: .6;
      pointer-events: none;
    }

    &.is-focused {
      outline: 1px solid $color-link;
      outline-offset: 2px;
    }

    .p-multiselect__item {
      border: 1px solid $color-mid-light;
      border-radius: 2em;
      display: block;
      font-size: .875rem;
      margin-right: .5rem;
      margin-top: .3rem;
      padding: 0 .5rem;

      .p-multiselect__item-remove {
        cursor: pointer;
        height: .75em;
        margin-left: .5rem;
        width: .75em;
      }
    }

    .p-multiselect__input {
      background: 0;
      border: 0 none;
      box-shadow: none;
      flex-grow: 1;
      float: left;
      margin-bottom: 0;
      min-width: 0;
      outline: none;
      width: auto;
    }

    .p-multiselect__options {
      @extend %vf-has-box-shadow;
      background: $color-x-light;
      left: 0;
      list-style-type: none;
      margin-left: 0;
      max-height: 10rem;
      min-height: 2.5rem;
      overflow: auto;
      padding-left: 0;
      position: absolute;
      top: 100%;
      width: 100%;
      z-index: 1;

      &::before {
        color: $color-mid-light;
        content: 'No matches';
        font-size: $sp-medium;
        left: 0;
        padding: .5rem;
        position: absolute;
        top: 0;
      }
    }

    .p-multiselect__option {
      background: $color-x-light;
      cursor: pointer;
      padding: .5rem;
      position: relative;

      &.is-highlighted,
      &:hover {
        background: $color-light;
      }
    }
  }
}
